<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%><%@ include file="/include.inc.jsp"%>

<script type="text/javascript">

$(function(){
	$("#old_password").blur(function(){
		$.post("${path}/admin/validatePwd?pwd="+$(this).val()+"",function(data){
			if(!data){
				$("#old_password_").show();
			}else{
				$("#old_password_").hide();
			}
		},"json");
	});
	
	$("#updatePassworkButton").click(function(){
		$.post("${path}/admin/validatePwd?pwd="+$("#old_password").val()+"",function(data){
			if(!data){
				$("#old_password_").show(); return false;
			}else{
				if($("#new_password").val()==$("#password_confirm").val()){ 
					$("#password_confirm_").hide();
					$("#updatePasswordForm").submit();
				}else{
					$("#password_confirm_").show();
				}
			}
		},"json");
	});
	
	
});

</script>
<div class="bjui-pageContent">
<form id="updatePasswordForm" method="post" action="${path }/admin/updatePwd" class="pageForm" data-toggle="validate">
	<div class="pageFormContent" data-layout-h="0">
		    <div class="suggestion">
                <span class="sugicon"><span class="strong colorgorning2">当前操作提示：</span><span class="colorgorningage">请在以下窗口中输入要修改的用户密码</span></span>
            </div>
            
            <div class="sugtitle">
                <span class="sugtitleicon"><span class="strong colorgorning2">原密码、新密码 相关信息</span></span>
            </div>
			<div class="formdiv">
	                <table width="100%" border="0">
		                <tbody>
		                	<tr class="trstyle2">
		                        <td width="20%" class="trtitle01"><b>输入原密码</b></td>
		                        <td width="80%" class="trtitle02">
		                            <input id="old_password" type="password" class="form-control validate[required,minSize[1]] required" maxlength="36" size="20">
		                            <span id="old_password_" style="display:none;color:red;"  class="error">原密码错误</span>
		                        </td>
		                    </tr>   
		                    <tr class="trstyle2">
		                        <td width="20%" class="trtitle01"><b>输入新密码</b></td>
		                        <td width="80%" class="trtitle02">
		                            <input type="password" name="passWord" id="new_password" class="form-control validate[required,minSize[1]] required" maxlength="36" size="20" >
		                        </td>
		                    </tr>  
		                     <tr class="trstyle2">
		                        <td width="20%" class="trtitle01"><b>确认新密码</b></td>
		                        <td width="80%" class="trtitle02">
		                            <input id="password_confirm" type="password" class="form-control validate[required, equals[new_password],minSize[1]] required" size="20">
		                        	<span id="password_confirm_" style="display:none;color:red;"  class="error">新密码不一致</span>
		                        </td>
		                    </tr>  
		                </tbody>
	                </table>
	        </div>
	        
	</div>
	<div class="bjui-footBar" style="text-align: center;">
		<ul style="margin-left: 30%">
			<li style="float: left"><div class="buttonActive"><div class="buttonContent"><button id="updatePassworkButton" type="button" class="btn-default">确认修改</button></div></div></li>
			<li style="float: left"><div class="button"><div class="buttonContent"><button class="btn-close" type="button" >取消修改</button></div></div></li>
		</ul>
	</div>
</form>
</div>
